// src/Node.cpp
#include "../heads/Node.h"
#include <iostream>

Node::Node(int x, int y, State st) : position(x, y), state(st) {}

void Node::add_neighbor(Node* neighbor) {
    neighbors.push_back(neighbor);
}

void Node::display() {
    std::cout << "Node at position (" << position.first << ", " << position.second << ") with state " 
              << static_cast<int>(state) << " has neighbors: ";
    for (auto& neighbor : neighbors) {
        std::cout << "(" << neighbor->position.first << ", " << neighbor->position.second << ") ";
    }
    std::cout << std::endl;
}

std::pair<int, int> Node::get_position() {
    return position;
}

State Node::get_state() {
    return state;
}